#设置cmake最低版本
cmake_minimum_required(VERSION 3.4.1)

#设置项目名称
project(tst_qtlocation_auto)

#引入add_module模板文件
include(${ISSQTTESTROOTDIR}/cmake/add_module.cmake)

#设置测试类型，auto为自动测试，manual为手动测试,即test目录下的文件夹名
set(TEST_TYPE auto)
#设置模块名
set(MODULE qtlocation)
#设置需要链接的模块
set(LinkQt Core Network Quick Location Positioning Sql Concurrent SerialPort QmlWorkerScript)
#设置需要链接的模块的私有模块
set(LinkQtPrivate Core Network Quick Location Positioning)

add_definitions("-DSRCDIR=\"${CMAKE_CURRENT_SOURCE_DIR}/\"")


set(CodeRootPath ../../../../../../../qtlocation)
include_directories(${CodeRootPath}/src/location/maps
                    ${CodeRootPath}/src/plugins/geoservices/nokia
)

#多级目录
set(TEST_ITEMS ${TEST_ITEMS}
    declarative_core
    declarative_geoshape
    declarative_ui
    doublevectors
    maptype
    nokia_services/places_semiauto
    placemanager_utils
    placesplugin_unsupported
    positionplugintest
    qgeoaddress
    qgeoareamonitor
    qgeocameracapabilities
    qgeocameradata
    qgeocameratiles
    qgeocircle
    qgeosatelliteinfosource
    qgeoserviceprovider
    qgeoshape
    qgeotiledmapscene
    qgeotilespec
    qmlinterface
    qplace
    qplaceattribute
    qplacecategory
    qplacecontactdetail
    qplacecontentrequest
    qplacedetailsreply
    qplaceeditorial
    qplaceimage
    qplacemanager
    qplacemanager_unsupported
    qplacematchreply
    qplacematchrequest
    qplaceperiod
    qplaceratings
    qplacereply
    qplaceresult
    qplacereview
    qplacesearchreply
    qplacesearchrequest
    qplacesearchresult
    qplacesearchsuggestionreply
    qplacesupplier
    qplaceuser
    qproposedsearchresult
    positionplugintest
    utils
)

#排出不需要的.cpp
set(EXCLUDE_SRC ${EXCLUDE_SRC}
    qgeosatelliteinfosource/tst_qgeosatelliteinfosource.cpp         #main
    qplaceperiod/tst_qplaceperiod.cpp
)

add_sources(../../src/plugins/geoservices/nokia/qgeoroutexmlparser.cpp
            utils/qlocationtestutils.cpp
)

set(MANUAL_ADD_MAIN 0)
set(PLUGINS QOpenHarmonyPlatformIntegrationPlugin GeoServiceProviderFactoryEsri QGeoServiceProviderFactoryItemsOverlay QGeoServiceProviderFactoryMapbox
QGeoServiceProviderFactoryMapboxGL QGeoServiceProviderFactoryNokia QGeoServiceProviderFactoryOsm QGeoPositionInfoSourceFactoryHarmony
QGeoPositionInfoSourceFactoryPoll QGeoPositionInfoSourceFactorySerialNmea)
create_library(${TEST_ITEMS})

